<include file="Public/header" />
<style>
    .unchecked{
        border: 1px solid gray;
        padding: 6px 6px 6px 6px;
    }
    .checked{
        border: 2px solid gray;
        padding: 6px 6px 6px 6px;
        color: rgb(85, 85, 85);
    }
</style>
<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <h3>会员</h3>
            <ul class="tab-base">
                <li><a href="{:U('Member/member')}"><span>会员管理</span></a></li>
                <li><a href="JavaScript:void(0);" class="current" ><span>编辑</span></a></li>
            </ul>
        </div>
    </div>
    <div class="fixed-empty"></div>
    <form method="post" enctype="multipart/form-data" name="form1">
        <table class="table tb-type2">
            <tbody>
            <tr class="noborder">
                <td colspan="2" class="required"><label for="email">用户名:</label></td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform"><span>{$vo['member_name']}</span></td>
                <td class="vatop tips"><span class="vatop rowform">用户名</span></td>
            </tr>
            <tr class="noborder">
                <td colspan="2" class="required"><label for="email">邮箱:</label></td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform"><input id="email" name="email" value="{$vo['email']}" class="txt" type="text" /></td>
                <td class="vatop tips"><span class="vatop rowform">用户邮箱</span></td>
            </tr>

            <tr class="noborder">
                <td colspan="2" class="required"><label for="nickname">昵称:</label></td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform"><input id="nickname" name="nickname" value="{$vo['nickname']}" class="txt" type="text" /></td>
                <td class="vatop tips"><span class="vatop rowform">用户昵称</span></td>
            </tr>

            <tr>
                <td colspan="2" class="required"><label for="profession">职位:</label></td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform"><input id="profession" name="profession" value="{$vo['profession']}" class="txt" type="text" /></td>
                <td class="vatop tips"><span class="vatop rowform"></span></td>
            </tr>
            <!--权限设置-->
            <!-- <tr class="noborder">
                <td colspan="2" class="required"><label for="site_size">权限设置:</label></td>
            </tr> -->
<!--             <tr class="noborder">
                <td class="rowform">

                    <div>
                        <input name="comment_status" value="{$vo['comment_status']}" type="hidden" />
                        <span c_value='0' class='<if condition="$vo['comment_status'] eq 0"> checked <else /> unchecked</if>'  name='sizeSpan'  checked='false' onclick='change(this);' >正常</span> 
                        <span c_value='1' class='<if condition="$vo['comment_status'] eq 1"> checked <else /> unchecked</if>' name='sizeSpan' checked='false' onclick='change(this);' >冻结</span> 
                        <span c_value='2' class='<if condition="$vo['comment_status'] eq 2"> checked <else /> unchecked</if>' name='sizeSpan' checked='false' onclick='change(this);' >封锁</span>
                    </div>

                </td>
                <td class="vatop tips">
            <span class="vatop rowform">
              权限设置
            </span>
                </td>
            </tr> -->
            <tr class="noborder">
                <td colspan="2" class="required"><label for="site_size">用户状态:</label></td>
            </tr>
            <tr class="noborder">
                <td class="rowform">

                    <div>
                        <input name="status" value="{$vo['status']}" type="hidden" />
                        <span c_value='1' class='<if condition="$vo['status'] eq 1"> checked <else /> unchecked</if>'  name='sizeSpan'  checked='false' onclick='change(this);' >正常</span> 

                        <span c_value='0' class='<if condition="$vo['status'] eq 0"> checked <else /> unchecked</if>' name='sizeSpan' checked='false' onclick='change(this);' >禁用</span> 
                    </div>

                </td>
                <td class="vatop tips">
            <span class="vatop rowform">
                默认正常状态，用户被禁用则不能登录客户端
            </span>
                </td>
            </tr>

            </tbody>
            <tfoot>
            <tr class="tfoot">
                <td colspan="2" ><a href="JavaScript:void(0);" class="btn" onclick="document.form1.submit()"><span>保存</span></a></td>
            </tr>
            </tfoot>
        </table>
    </form>
</div>
<script language="javascript">
    var obj={
        colorSpan:"",
        sizeSpan:""
    };
    function change(span)
    {
        $('span[name="'+$(span).attr('name')+'"]').each(function(){
            //    if(this.checked&&this!=span)
            // {
            this.className="unchecked";
            this.checked=false;
            // }
        });
        obj[$(span).attr('name')]=span.innerHTML;
        span.className="checked";
        span.checked=true;
        var c_value=$(span).attr('c_value');
        $('input[name="status"]').val(c_value);
    }
    function select(c_value)
    {
        var html='';
        for(var i in obj)
        {
            if(obj[i]!='')
            {
                html+='<font color=orange>"'+ obj[i]+'"</font> 、';
            }
        }
        // html='<b>已选择:</b> '+html.slice(0,html.length-1);
        // $('#resultSpan').html(html);

    }
</script>
<include file="Public/footer" />